<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		[#include "/admin/include/head.htm"]
		<script type="text/javascript" src="${base}/resource/thirdparty/editor/kindeditor.js"></script>
		<script type="text/javascript">
			$(function(){
				var mainform = $("#mainform");  
				//表单底部按钮 
			    LG.setFormDefaultBtn(parent.f_child_cancel, function(){
					f_saveForDialog(mainform, function(){
						parent.f_reloadData();
					});
					
				});
				
				
			});
		</script>
	</head>
	<body style="overflow:  scroll;padding: 5px">
		<div id="tabcontainer" style="width:inherit; overflow:hidden;margin:3px;padding-bottom: 50px">
			<form action="${base}/admin/b2c/consult/update.jhtml" method="post" id="mainform" class="validate">
				<input type="hidden" name="id" value="${(consult.id)!''}" />
				<table class="inputTable2">
					<tr>
						<th>标题：</th>
						<td><h2>${(consult.title)!}</h2></td>
						<th>删除状态</th>
						<td><h2 [#if consult.deleteStatus]class="red"[/#if]>[#if consult.deleteStatus]已删除[#else]未删除[/#if]</h2></td>
					</tr>
					<tr>
						<th>发送者：</th>
						<td>${(consult.member.username)!}</td>
						<th>发送时间：</th>
						<td>${(consult.createDate?datetime)!}</td>
					</tr>
					<tr>
						<th>阅读状态：</th>
						<td>[#if consult.readStatus]已阅读[#else]未阅读[/#if]</td>
						<th>回复状态：</th>
						<td>[#if consult.returnStatus]已回复[#else]未回复[/#if]</td>
					</tr>
					<tr>
						<th>消息类型：</th>
						<td colspan="3">${DictionaryUtils.getEnumName(consult.type)}</td>
					</tr>
					[#if consult.attachFile??]
					<tr>
						<th>附图：</th>
						<td colspan="3">
							<img src="${(consult.attachFile)!}" width="200px" height="100px" />
						</td>
					</tr>
					[/#if]
					[#if consult.type = "correct"]
					<tr>
						<th>纠错商品名称：</th>
						<td colspan="3">
							<a style="color:blue" href="${(consult.goods.path)!}" target="_blank">${(consult.goods.name)!}</a>
							<span class="warnInfo"  >	
								<span class="icon">&nbsp;</span> 
								温馨提醒：若商品纠错已核实，请及时回复客户
							</span>
						</td>
					</tr>
					[/#if]
				</table>
				<table class="inputTable2">
					<tr>
						<th>消息内容:</th>
						<td>
							<textarea readonly="readonly" style="font-size: 20px" rows="5" cols="60" disabled="disabled">${consult.content}</textarea>
						</td>
					</tr>
					<tr>
						<th>回复内容:</th>
						<td>
							<textarea name="returnContent" id="editor">${(consult.returnContent)!}</textarea>
						</td>
					</tr>
				</table>
			</form>
		</div>
	</body>
	
	<script type="text/javascript">
		// 编辑器
		if(typeof(KindEditor) != "undefined") {
			KindEditor.ready(function(K) {
				editor = K.create("#editor", {
					height: "350px",
					items: [
						"source", "|", "undo", "redo", "|", "preview", "print", "template", "cut", "copy", "paste",
						"plainpaste", "wordpaste", "|", "justifyleft", "justifycenter", "justifyright",
						"justifyfull", "insertorderedlist", "insertunorderedlist", "indent", "outdent", "subscript",
						"superscript", "clearhtml", "quickformat", "selectall", "|", "fullscreen", "/",
						"formatblock", "fontname", "fontsize", "|", "forecolor", "hilitecolor", "bold",
						"italic", "underline", "strikethrough", "lineheight", "removeformat", "|", "image",
						"flash", "media", "insertfile", "table", "hr", "emoticons", "baidumap", "pagebreak",
						"anchor", "link", "unlink"
					],
					langType: "zh_CN",
					syncType: "form",
					filterMode: false,
					pagebreakHtml: '<hr class="pageBreak" \/>',
					allowFileManager: true,
					filePostName: "file",
					fileManagerJson: base + "/admin/system/upload/browser.jhtml?componentId=filePlugin",
					uploadJson: base + "/admin/system/upload/submit.jhtml",
					uploadImageExtension: setting.uploadImageExtension,
					uploadFlashExtension: setting.uploadFlashExtension,
					uploadMediaExtension: setting.uploadMediaExtension,
					uploadFileExtension: setting.uploadFileExtension,
					extraFileUploadParams: {
						token: Cookie.find("token"),
						uploadType:setting.uploadType
					},
					afterChange: function() {
						this.sync();
					}
				});
				if(typeof(editor) != "undefined"){
					editor.focus();
				}
			});
		}
	</script>
</html>